<?

/**
 * @name StandardFramework Network HTTP Protocol
 * @author DENFER
 * @copyright DENFER STUDIO
 */

Class HTTPHeaders {
	Protected $m_Headers = array();

	Public $Code = "200 OK";

	Public Function Add( $Key, $Value = null ){
		$this->m_Headers[$Key] = $Value;
	}

	Public Function Remove( $Key, $Value = null ){
		unset($this->m_Headers[$Key]);
	}

	Public Function toString(){
		$headers = 'HTTP/1.1 '.$this->Code.'\r\n';
		foreach ($this->m_Headers as $Key => $Value) {
			$headers .= $Key . ': ' . $Value;
		}
		$headers .= 'charset=UTF-8\r\n\r\n';
	}
}